<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>资讯已发布列表</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="../../layui/css/layui_v2.1.5.css" media="all"/>
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all" />
    <link rel="stylesheet" href="../../css/animate.css" media="all" />
    <link rel="stylesheet" href="../../css/style.css" media="all" />

    <style type="text/css">
        .label_1{
            background: #35C6D1;
            height: 22px;
            line-height: 22px;
            padding: 0 8px;
            margin-right:5px;
            font-size: 12px;
            color: #fff;
            border-radius: 3px;
            position: relative;
        }

        /*推荐*/
        .intro{
            background: #ffca18;
        }

        /*置顶*/
        .toTop{
            background: #ff00bc;
        }

        /*撤回重审*/
        .revoke{
            background: #97ff01;
        }

        /*下架*/
        .under{
            background: #0c84ff;
        }
        
        /*图文*/
        .imgText{
            background: #77ff8c;
        }

        /*视频专区*/
        .video{
            background: #ff6600;
        }

        .close{
            position: absolute;
            top: -4px;
            right: -4px;
            color: #a6a6a6;
            box-shadow: 0 0 5px #000000;
            display: inline-block;
            width: 10px;
            height: 10px;
            line-height: 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            display: none;
        }

        .hover_close:hover .close{
            display: block;
        }

        .nav-type{
            background: #ff00f7;
            padding:2px 5px;
            color: #fff;
            font-size:12px;
            border-radius: 3px;
        }

    </style>
</head>

<body class="childrenBody">
<blockquote class="layui-elem-quote information_search">

    <form class="layui-form">
        <!--<div class="layui-inline">-->
            <!--<label class="layui-form-label">标题</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" value="" placeholder="请输入标题..." class="layui-input search_input" id="search_input"/>-->
            <!--</div>-->
        <!--</div>-->

        <div class="layui-form-item" style="margin-bottom: 0px;">
            <div class="layui-inline">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="请输入标题..." class="layui-input search_input" id="search_input"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">栏目</label>
                <div class="layui-input-inline">
                    <select name="navType" id="navType">
                        <option value=""></option>
                        <option th:each="nav,iterStat:${navList}" th:value="${iterStat.index}" th:text="${nav}"></option>
                    </select>
                </div>
            </div>


            <div class="layui-inline">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-inline">
                    <select name="floorType" id="floorType">
                        <option value="999">全部</option>
                        <option th:each="nav,iterStat:${statusKeys}" th:value="${nav}" th:text="${statusValue.get(nav)}"></option>
                    </select>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">起始时间</label>
                <div class="layui-input-inline">
                    <input type="text" placeholder="起始时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="startTime"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">结束时间</label>
                <div class="layui-input-inline">
                    <input type="text" placeholder="结束时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="endTime"/>
                </div>
                <a class="layui-btn search_btn" id="searchBtn">查询</a>
            </div>
        </div>

        <!--<div class="layui-inline">-->
            <!--<label class="layui-form-label">起始时间</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" placeholder="起始时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="startTime"/>-->
            <!--</div>-->
        <!--</div>-->

        <!--<div class="layui-inline">-->
            <!--<label class="layui-form-label">结束时间</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" placeholder="结束时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="endTime"/>-->
            <!--</div>-->
            <!--<a class="layui-btn search_btn" id="searchBtn">查询</a>-->
        <!--</div>-->
    </form>

</blockquote>
<div class="layui-form" id="informations_list">

    <div type="text/css" th:replace="fragment/fragment::infoStyle"></div>

    <div class="layui-fluid info-list" id="informationListTb"></div>


</div>
<div id="pagination"></div>


<script type="text/html" id="informationList">
    {{if list != null}}
    {{each list as value i}}
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md6 cover-img">
                    <img src="{{value.coverUrl | subString}}" alt="cover"/>
                </div>
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md6">
                    <div class="info">
                        <p>
                                <span class="layui-show-md-inline-block title">
                                {{value.title}}
                                </span>
                        </p>
                        <p th:include="fragment/fragment::navFragment"></p>
                        <p class="status_wrap">
                            状态：


                            {{if value.status == 0}}
                            <span class="layui-show-md-inline-block status label_1">草稿</span>
                            {{else if value.status == 1}}
                            <span class="layui-show-md-inline-block status label_1">待审核<i class="close">×</i></span>
                            {{else if value.status == 2}}
                            <span class="layui-show-md-inline-block status label_1">审核通过</span>
                            {{else if value.status == 3}}
                            <span class="layui-show-md-inline-block status label_1">已发布</span>
                            {{else}}
                            <span class="layui-show-md-inline-block status label_1">审核未通过</span>
                            {{/if}}


                            {{if value.floorType == 11}}
                            <span class="layui-show-md-inline-block animated bounceUp status label_1 toTop hover_close" optType="toTop" for="toTopBtn" infoId="{{value.id}}">置顶<i class="close">×</i></span>
                            {{else if value.floorType == 60}}
                            <span class="layui-show-md-inline-block animated bounceUp status label_1 slider hover_close" optType="slider" for="sliderBtn" infoId="{{value.id}}">轮播<i class="close">×</i></span>
                            {{else if value.floorType == 30}}


                                {{if value.imgStatus == 12}}
                                <span class="layui-show-md-inline-block animated bounceUp status label_1 imgText">大图文</span>
                                {{else if value.imgStatus == 13}}
                                <span class="layui-show-md-inline-block animated bounceUp status label_1 imgText">左右图文</span>
                                {{else if value.imgStatus == 30}}
                                <span class="layui-show-md-inline-block animated bounceUp status label_1 imgText">图文</span>
                                {{else}}
                                <span class="layui-show-md-inline-block animated bounceUp status label_1 imgText">图文</span>
                                {{/if}}




                            {{else if value.floorType == 10}}
                            <span class="layui-show-md-inline-block animated bounceUp status label_1 video">视频</span>
                            {{/if}}

                            {{if value.isIntro == 0}}
                            <span class="layui-show-md-inline-block animated bounceUp status label_1 intro hover_close" optType="intro" for="introBtn" infoId="{{value.id}}">推荐<i class="close">×</i></span>
                            {{/if}}

                            {{if value.isShow == 1}}
                            <span class="layui-show-md-inline-block animated bounceUp status label_1 under hover_close" optType="under" for="underBtn" infoId="{{value.id}}">已下架<i class="close">×</i></span>
                            {{/if}}

                        </p>
                        <p>
                            <span class="layui-show-md-inline-block">作者：{{value.author}}</span>
                            <!--<button class="layui-btn layui-btn-primary layui-btn-small">推荐</button>-->
                            <!--<button class="layui-btn layui-btn-small">推送</button>-->
                            <!--<button class="layui-btn layui-btn-normal layui-btn-small">用户授权</button>-->
                        </p>
                        <p>
                            <span class="layui-show-md-inline-block">发布时间：{{value.publishTime}}</span>
                        </p>
                        {{if value.status == 0}}
                        <p>
                            <button class="layui-btn layui-btn-normal layui-btn-small" infoId="{{value.id}}" id="editBtn">编辑</button>
                            <button class="layui-btn layui-btn-danger layui-btn-small" infoId="{{value.id}}" id="delBtn">删除</button>
                        </p>
                        {{/if}}
                        <p>
                            <button class="layui-btn layui-btn-primary layui-btn-small toTopBtn operate" optType="toTop" infoId="{{value.id}}" oriType="{{value.floorType}}">置顶</button>
                            <button class="layui-btn layui-btn-small underBtn operate" optType="under" infoId="{{value.id}}">下架</button>
                            <!--<button class="layui-btn layui-btn-normal layui-btn-small" id="autho">用户授权</button>-->
                            <button class="layui-btn layui-btn-warm layui-btn-small introBtn operate" optType="intro" infoId="{{value.id}}">推荐</button>
                            <button class="layui-btn layui-btn-normal layui-btn-small sliderBtn operate" optType="slider" infoId="{{value.id}}">轮播</button>
                            <button class="layui-btn layui-btn-danger layui-btn-small revokeBtn operate" optType="revoke" infoId="{{value.id}}">撤回重审</button>
                            <!--<button class="layui-btn layui-btn-danger layui-btn-small">备用</button>-->
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="layui-col-md4">-->

        <!--</div>-->
    </div>
    {{/each}}
    {{else}}
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">暂无数据!</div>
    </div>
    {{/if}}
</script>



<script type="text/javascript" src="../../layui/layui.js"></script>
<script type="text/javascript" src="../../js/information/publishedList.js?version=1.0.1"></script>
<script type="text/javascript" src="../../js/common/template.js"></script>



<script type="text/javascript">
    // 注册方法
    template.helper("subString",function (str){
        if(str==null||str==""||str==undefined){
            return "";
        }
        var _str = str.split("@@@@");
        return _str[0];
    });

</script>

</body>
</html>